import pymysql
from etc import DATABASECONF


def get_connection():
    connection = pymysql.connect(host=DATABASECONF['mysql_host'], user=DATABASECONF['mysql_user'], password=DATABASECONF['mysql_pwd'] , db=DATABASECONF['mysql_db'] , charset='utf8mb4', cursorclass=pymysql.cursors.DictCursor)
    return connection

